const mongoose = require('mongoose');

const ShareSchema = new mongoose.Schema({
  shareId: { type: String, required: true, unique: true }, // 壳子ID
  path: { type: String, required: true },                  // 当前文件路径
  filename: { type: String },                              // 文件名
  owner: { type: String },                                 // 创建人
  createdAt: { type: Date, default: Date.now },
  expiresAt: { type: Date },                               // 可选：过期时间
});

module.exports = mongoose.model('Share', ShareSchema); 